home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / program / lgavb25.zip / VB.ZIP / LGCAPT.FRM < prev    next >
Text File  |  1996-01-16  |  16KB  |  509 lines

  1. VERSION 2.00
  2. Begin Form CaptionDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Captions"
  6.    ClientHeight    =   3555
  7.    ClientLeft      =   2340
  8.    ClientTop       =   1290
  9.    ClientWidth     =   8625
  10.    Height          =   3960
  11.    Left            =   2280
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3555
  17.    ScaleWidth      =   8625
  18.    Top             =   945
  19.    Width           =   8745
  20.    Begin LGAUGE LGauge1 
  21.       AutoRedraw      =   -1  'True
  22.       AVersion        =   2.501
  23.       BackColor       =   &H00C0C0C0&
  24.       BandID          =   0
  25.       Bands           =   1
  26.       BevelInner      =   0  ' 0 - None
  27.       BevelOuter      =   1  ' 1 - Raised
  28.       BevelWidth      =   4
  29.       BorderWidth     =   0
  30.       CaptionID       =   0
  31.       Captions        =   3
  32.       FontID          =   0
  33.       Height          =   3405
  34.       Left            =   240
  35.       Orientation     =   0  ' 0 - Horizontal
  36.       PointerID       =   0
  37.       Pointers        =   3
  38.       ScaleID         =   0
  39.       Scales          =   1
  40.       TabIndex        =   28
  41.       TicID           =   2
  42.       Tics            =   3
  43.       Top             =   60
  44.       Width           =   4545
  45.       ZLoad           =   LGCAPT.FRX:0000
  46.    End
  47.    Begin Frame Frame4 
  48.       BackColor       =   &H00C0C0C0&
  49.       Caption         =   "Caption Positions"
  50.       FontBold        =   -1  'True
  51.       FontItalic      =   0   'False
  52.       FontName        =   "System"
  53.       FontSize        =   9.75
  54.       FontStrikethru  =   0   'False
  55.       FontUnderline   =   0   'False
  56.       Height          =   975
  57.       Left            =   4890
  58.       TabIndex        =   25
  59.       Top             =   1845
  60.       Width           =   3645
  61.       Begin HScrollBar HScroll1 
  62.          Height          =   240
  63.          Index           =   0
  64.          Left            =   885
  65.          Max             =   100
  66.          TabIndex        =   27
  67.          Top             =   330
  68.          Width           =   2350
  69.       End
  70.       Begin HScrollBar HScroll1 
  71.          Height          =   240
  72.          Index           =   1
  73.          Left            =   885
  74.          Max             =   100
  75.          TabIndex        =   26
  76.          Top             =   570
  77.          Width           =   2350
  78.       End
  79.       Begin Label Label2 
  80.          AutoSize        =   -1  'True
  81.          BackStyle       =   0  'Transparent
  82.          Caption         =   "0"
  83.          Height          =   195
  84.          Index           =   0
  85.          Left            =   3300
  86.          TabIndex        =   5
  87.          Top             =   345
  88.          Width           =   120
  89.       End
  90.       Begin Label Label1 
  91.          AutoSize        =   -1  'True
  92.          BackStyle       =   0  'Transparent
  93.          Caption         =   "CaptionX:"
  94.          FontBold        =   0   'False
  95.          FontItalic      =   0   'False
  96.          FontName        =   "Arial"
  97.          FontSize        =   8.25
  98.          FontStrikethru  =   0   'False
  99.          FontUnderline   =   0   'False
  100.          Height          =   210
  101.          Index           =   0
  102.          Left            =   180
  103.          TabIndex        =   9
  104.          Top             =   330
  105.          Width           =   690
  106.       End
  107.       Begin Label Label1 
  108.          AutoSize        =   -1  'True
  109.          BackStyle       =   0  'Transparent
  110.          Caption         =   "CaptionY:"
  111.          FontBold        =   0   'False
  112.          FontItalic      =   0   'False
  113.          FontName        =   "Arial"
  114.          FontSize        =   8.25
  115.          FontStrikethru  =   0   'False
  116.          FontUnderline   =   0   'False
  117.          Height          =   210
  118.          Index           =   1
  119.          Left            =   195
  120.          TabIndex        =   11
  121.          Top             =   570
  122.          Width           =   705
  123.       End
  124.       Begin Label Label2 
  125.          AutoSize        =   -1  'True
  126.          BackStyle       =   0  'Transparent
  127.          Caption         =   "0"
  128.          Height          =   195
  129.          Index           =   1
  130.          Left            =   3300
  131.          TabIndex        =   16
  132.          Top             =   585
  133.          Width           =   120
  134.       End
  135.    End
  136.    Begin Frame Frame2 
  137.       BackColor       =   &H00C0C0C0&
  138.       Caption         =   "Caption Font ID"
  139.       FontBold        =   -1  'True
  140.       FontItalic      =   0   'False
  141.       FontName        =   "System"
  142.       FontSize        =   9.75
  143.       FontStrikethru  =   0   'False
  144.       FontUnderline   =   0   'False
  145.       Height          =   1095
  146.       Left            =   6165
  147.       TabIndex        =   21
  148.       Top             =   30
  149.       Width           =   2355
  150.       Begin OptionButton Option2 
  151.          BackColor       =   &H00C0C0C0&
  152.          Caption         =   "MS Sans Serif (FontID=2)"
  153.          FontBold        =   0   'False
  154.          FontItalic      =   0   'False
  155.          FontName        =   "MS Sans Serif"
  156.          FontSize        =   8.25
  157.          FontStrikethru  =   0   'False
  158.          FontUnderline   =   0   'False
  159.          Height          =   240
  160.          Index           =   2
  161.          Left            =   90
  162.          TabIndex        =   22
  163.          Top             =   705
  164.          Width           =   2235
  165.       End
  166.       Begin OptionButton Option2 
  167.          BackColor       =   &H00C0C0C0&
  168.          Caption         =   "Courier(FontID=1)"
  169.          FontBold        =   0   'False
  170.          FontItalic      =   0   'False
  171.          FontName        =   "Courier New"
  172.          FontSize        =   8.25
  173.          FontStrikethru  =   0   'False
  174.          FontUnderline   =   0   'False
  175.          Height          =   225
  176.          Index           =   1
  177.          Left            =   90
  178.          TabIndex        =   23
  179.          Top             =   495
  180.          Width           =   2235
  181.       End
  182.       Begin OptionButton Option2 
  183.          BackColor       =   &H00C0C0C0&
  184.          Caption         =   "Arial (FontID=0)"
  185.          FontBold        =   0   'False
  186.          FontItalic      =   0   'False
  187.          FontName        =   "Arial"
  188.          FontSize        =   8.25
  189.          FontStrikethru  =   0   'False
  190.          FontUnderline   =   0   'False
  191.          Height          =   240
  192.          Index           =   0
  193.          Left            =   90
  194.          TabIndex        =   24
  195.          Top             =   285
  196.          Width           =   1770
  197.       End
  198.    End
  199.    Begin Frame Frame3 
  200.       BackColor       =   &H00C0C0C0&
  201.       Caption         =   "Caption Color"
  202.       FontBold        =   -1  'True
  203.       FontItalic      =   0   'False
  204.       FontName        =   "System"
  205.       FontSize        =   9.75
  206.       FontStrikethru  =   0   'False
  207.       FontUnderline   =   0   'False
  208.       Height          =   630
  209.       Left            =   4890
  210.       TabIndex        =   4
  211.       Top             =   1170
  212.       Width           =   3645
  213.       Begin Label Colors 
  214.          BackColor       =   &H00000000&
  215.          Height          =   225
  216.          Index           =   0
  217.          Left            =   720
  218.          TabIndex        =   6
  219.          Top             =   240
  220.          Width           =   225
  221.       End
  222.       Begin Label Colors 
  223.          BackColor       =   &H000000FF&
  224.          Height          =   225
  225.          Index           =   1
  226.          Left            =   1425
  227.          TabIndex        =   7
  228.          Top             =   240
  229.          Width           =   225
  230.       End
  231.       Begin Label Colors 
  232.          BackColor       =   &H00C00000&
  233.          Height          =   225
  234.          Index           =   2
  235.          Left            =   945
  236.          TabIndex        =   13
  237.          Top             =   240
  238.          Width           =   225
  239.       End
  240.       Begin Label Colors 
  241.          BackColor       =   &H00404040&
  242.          Height          =   225
  243.          Index           =   3
  244.          Left            =   1650
  245.          TabIndex        =   14
  246.          Top             =   240
  247.          Width           =   225
  248.       End
  249.       Begin Label Colors 
  250.          BackColor       =   &H0000FF00&
  251.          Height          =   225
  252.          Index           =   4
  253.          Left            =   1185
  254.          TabIndex        =   15
  255.          Top             =   240
  256.          Width           =   225
  257.       End
  258.       Begin Label Colors 
  259.          BackColor       =   &H0000FFFF&
  260.          Height          =   225
  261.          Index           =   5
  262.          Left            =   1890
  263.          TabIndex        =   17
  264.          Top             =   240
  265.          Width           =   225
  266.       End
  267.       Begin Label Colors 
  268.          BackColor       =   &H00FFFF00&
  269.          Height          =   225
  270.          Index           =   6
  271.          Left            =   2130
  272.          TabIndex        =   18
  273.          Top             =   240
  274.          Width           =   225
  275.       End
  276.       Begin Label Colors 
  277.          BackColor       =   &H00800080&
  278.          Height          =   225
  279.          Index           =   7
  280.          Left            =   2355
  281.          TabIndex        =   19
  282.          Top             =   240
  283.          Width           =   225
  284.       End
  285.       Begin Label Colors 
  286.          BackColor       =   &H000080FF&
  287.          Height          =   225
  288.          Index           =   8
  289.          Left            =   2595
  290.          TabIndex        =   20
  291.          Top             =   240
  292.          Width           =   225
  293.       End
  294.    End
  295.    Begin TextBox Text1 
  296.       FontBold        =   -1  'True
  297.       FontItalic      =   0   'False
  298.       FontName        =   "System"
  299.       FontSize        =   9.75
  300.       FontStrikethru  =   0   'False
  301.       FontUnderline   =   0   'False
  302.       Height          =   360
  303.       Left            =   4890
  304.       TabIndex        =   10
  305.       Text            =   " "
  306.       Top             =   3105
  307.       Width           =   3645
  308.    End
  309.    Begin Frame Frame1 
  310.       BackColor       =   &H00C0C0C0&
  311.       Caption         =   "Caption ID"
  312.       FontBold        =   -1  'True
  313.       FontItalic      =   0   'False
  314.       FontName        =   "System"
  315.       FontSize        =   9.75
  316.       FontStrikethru  =   0   'False
  317.       FontUnderline   =   0   'False
  318.       Height          =   1095
  319.       Left            =   4905
  320.       TabIndex        =   0
  321.       Top             =   30
  322.       Width           =   1230
  323.       Begin OptionButton Option1 
  324.          BackColor       =   &H00C0C0C0&
  325.          Caption         =   "2"
  326.          FontBold        =   -1  'True
  327.          FontItalic      =   0   'False
  328.          FontName        =   "System"
  329.          FontSize        =   9.75
  330.          FontStrikethru  =   0   'False
  331.          FontUnderline   =   0   'False
  332.          Height          =   255
  333.          Index           =   2
  334.          Left            =   360
  335.          TabIndex        =   3
  336.          Top             =   720
  337.          Width           =   615
  338.       End
  339.       Begin OptionButton Option1 
  340.          BackColor       =   &H00C0C0C0&
  341.          Caption         =   "1"
  342.          FontBold        =   -1  'True
  343.          FontItalic      =   0   'False
  344.          FontName        =   "System"
  345.          FontSize        =   9.75
  346.          FontStrikethru  =   0   'False
  347.          FontUnderline   =   0   'False
  348.          Height          =   255
  349.          Index           =   1
  350.          Left            =   360
  351.          TabIndex        =   2
  352.          Top             =   480
  353.          Width           =   615
  354.       End
  355.       Begin OptionButton Option1 
  356.          BackColor       =   &H00C0C0C0&
  357.          Caption         =   "0"
  358.          FontBold        =   -1  'True
  359.          FontItalic      =   0   'False
  360.          FontName        =   "System"
  361.          FontSize        =   9.75
  362.          FontStrikethru  =   0   'False
  363.          FontUnderline   =   0   'False
  364.          Height          =   255
  365.          Index           =   0
  366.          Left            =   360
  367.          TabIndex        =   1
  368.          Top             =   240
  369.          Value           =   -1  'True
  370.          Width           =   615
  371.       End
  372.    End
  373.    Begin Label Label1 
  374.       AutoSize        =   -1  'True
  375.       BackStyle       =   0  'Transparent
  376.       Caption         =   "Caption "
  377.       Height          =   240
  378.       Index           =   2
  379.       Left            =   4890
  380.       TabIndex        =   8
  381.       Top             =   2880
  382.       Width           =   720
  383.    End
  384.    Begin Label Label2 
  385.       Alignment       =   2  'Center
  386.       AutoSize        =   -1  'True
  387.       BackStyle       =   0  'Transparent
  388.       Caption         =   " "
  389.       Height          =   195
  390.       Index           =   2
  391.       Left            =   6720
  392.       TabIndex        =   12
  393.       Top             =   3030
  394.       Width           =   90
  395.    End
  396. End
  397. Dim colorid(9) As Integer
  398.  
  399. Sub Colors_Click (index As Integer)
  400.  
  401.     lGauge1.CaptionColor = colors(index).BackColor
  402.     text1.ForeColor = lGauge1.CaptionColor
  403.     colorid(lGauge1.CaptionID) = index
  404.  
  405. End Sub
  406.  
  407. Sub Form_Load ()
  408.  
  409.     hscroll1(0) = lGauge1.CaptionX * 100
  410.     hscroll1(1) = lGauge1.CaptionY * 100
  411.     text1 = lGauge1.Caption
  412.     Option2(lGauge1.CaptionFontID) = True
  413.  
  414.     lGauge1.CaptionID = 0
  415.  
  416. End Sub
  417.  
  418. Sub HScroll1_Change (index As Integer)
  419.  
  420.     Select Case index
  421.         Case 0
  422.             lGauge1.CaptionX = hscroll1(0) / 100
  423.             label2(0) = hscroll1(0) / 100
  424.         Case 1
  425.             lGauge1.CaptionY = hscroll1(1) / 100
  426.             label2(1) = hscroll1(1) / 100
  427.     End Select
  428.  
  429. End Sub
  430.  
  431. Sub HScroll1_Scroll (index As Integer)
  432.  
  433.     Select Case index
  434.         Case 0
  435.             lGauge1.CaptionX = hscroll1(0) / 100
  436.             label2(0) = hscroll1(0) / 100
  437.         Case 1
  438.             lGauge1.CaptionY = hscroll1(1) / 100
  439.             label2(1) = hscroll1(1) / 100
  440.     End Select
  441.  
  442. End Sub
  443.  
  444. Sub LGauge1_Slide ()
  445.  
  446.     Select Case lGauge1.PointerID
  447.         Case 0
  448.             lGauge1.PointerID = 0
  449.             pstart = lGauge1.PointerStart
  450.             pstop = lGauge1.PointerStop
  451.             
  452.             lGauge1.PointerID = 1
  453.             lGauge1.PointerValue = pstart
  454.             
  455.             lGauge1.PointerID = 2
  456.             lGauge1.PointerValue = pstop
  457.         Case 1
  458.             lGauge1.PointerID = 1
  459.             pstart = lGauge1.PointerValue
  460.             
  461.             lGauge1.PointerID = 0
  462.             If pstart > lGauge1.PointerStop - 5 Then
  463.                 pstart = lGauge1.PointerStop - 5
  464.             End If
  465.  
  466.             lGauge1.PointerStart = pstart
  467.             lGauge1.PointerID = 1
  468.             lGauge1.PointerValue = pstart
  469.         Case 2
  470.             lGauge1.PointerID = 2
  471.             pstop = lGauge1.PointerValue
  472.             
  473.             lGauge1.PointerID = 0
  474.             If pstop < lGauge1.PointerStart + 5 Then
  475.                 pstop = lGauge1.PointerStart + 5
  476.             End If
  477.             
  478.             lGauge1.PointerStop = pstop
  479.             lGauge1.PointerID = 2
  480.             lGauge1.PointerValue = pstop
  481.     End Select
  482.  
  483. End Sub
  484.  
  485. Sub Option1_Click (index As Integer)
  486.  
  487.     lGauge1.CaptionID = index
  488.     hscroll1(0) = lGauge1.CaptionX * 100
  489.     hscroll1(1) = lGauge1.CaptionY * 100
  490.     text1 = lGauge1.Caption
  491.     text1.ForeColor = lGauge1.CaptionColor
  492.     
  493.     Option2(lGauge1.CaptionFontID) = True
  494.  
  495. End Sub
  496.  
  497. Sub Option2_Click (index As Integer)
  498.     
  499.     lGauge1.CaptionFontID = index
  500.  
  501. End Sub
  502.  
  503. Sub Text1_Change ()
  504.  
  505.     lGauge1.Caption = text1
  506.  
  507. End Sub
  508.  
  509.